//
//  OrderDetailViewController.m
//  Best
//
//  Created by iDeneb on 7/26/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import "OrderDetailViewController.h"
#import "TrackEventsViewController.h"
#import "FeedbackViewController.h"


@implementation OrderDetailViewController


@synthesize orderDetailLabel,orderNoLabel, orderNoData, stateLabel,stateData,fromLabel,fromData,toLabel,toData,nameLabel,nameData,qwvLabel,qwvData,eventsLabel,showEventsButton,feedbackLabel,showFeedbackButton;
/*
 // The designated initializer.  Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
        // Custom initialization
    }
    return self;
}
*/

/*
// Implement loadView to create a view hierarchy programmatically, without using a nib.
- (void)loadView {
}
*/


// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
    [super viewDidLoad];
	
	[orderDetailLabel setText:NSLocalizedString(@"orderDetail", @"")];
	[orderNoLabel setText:NSLocalizedString(@"orderNoLabel", @"")];
	[orderNoData setText:NSLocalizedString(@"orderNoData", @"")];
	[stateLabel setText:NSLocalizedString(@"stateLabel", @"")];
	[stateData setText:NSLocalizedString(@"stateData", @"")];
	[fromLabel setText:NSLocalizedString(@"fromLabel", @"")];
	[fromData setText:NSLocalizedString(@"fromData", @"")];
	[toLabel setText:NSLocalizedString(@"toLabel", @"")];
	[toData setText:NSLocalizedString(@"toData", @"")];
	[nameLabel setText:NSLocalizedString(@"nameLabel", @"")];
	[nameData setText:NSLocalizedString(@"nameData", @"")];
	[qwvLabel setText:NSLocalizedString(@"qwvLabel", @"")];
	[qwvData setText:NSLocalizedString(@"qwvData", @"")];
	[eventsLabel setText:NSLocalizedString(@"eventsLabel", @"")];
	[feedbackLabel setText:NSLocalizedString(@"feedbackLabel", @"")];
	[showFeedbackButton setTitle:NSLocalizedString(@"showFeedbackButton", @"") forState:UIControlStateNormal];
	[showEventsButton setTitle:NSLocalizedString(@"showEventsButton", @"") forState:UIControlStateNormal];

	
}

-(IBAction)showFeedbackButtonClick:(id)sender{
	//NSString *urlText = NSLocalizedString(@"feedbackURL", @"");
	//[[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlText]];
	FeedbackViewController *feedbackViewController = [[FeedbackViewController alloc]initWithNibName:@"FeedbackView" bundle:nil];
	[self.navigationController pushViewController:feedbackViewController animated:YES];
}


-(IBAction)showEventsButtonClick:(id)sender{
	//NSString *urlText = NSLocalizedString(@"feedbackURL", @"");
	//[[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlText]];
	TrackEventsViewController *detailViewController = [[TrackEventsViewController alloc]initWithNibName:@"TrackEventsView" bundle:nil];
	[self.navigationController pushViewController:detailViewController animated:YES];
}


/*
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
*/

- (void)didReceiveMemoryWarning {
	// Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
	
	// Release any cached data, images, etc that aren't in use.
}

- (void)viewDidUnload {
	// Release any retained subviews of the main view.
	// e.g. self.myOutlet = nil;
}


- (void)dealloc {
    [super dealloc];
}


@end
